﻿namespace Agile.Service.Admin.Model.ViewModel.Sys;

public class InsertSysUserRequest
{
    ///<summary>昵称</summary>
    [Required]
    [JsonConverter(typeof(StringTrimConverter))]
    public string RealName { get; set; }

    ///<summary>用户名</summary>
    [Required]
    [JsonConverter(typeof(StringTrimConverter))]
    public string UserName { get; set; }

    ///<summary>用户密码</summary>
    [Required]
    [JsonConverter(typeof(StringTrimConverter))]
    public string UserPwd { get; set; }

    ///<summary>所属部门ID</summary>
    public List<long> DepartmentIDs { get; set; }

    ///<summary>岗位ID</summary>
    public List<long> PositionIDs { get; set; }

    ///<summary>角色ID</summary>
    public List<long> RoleIDs { get; set; }

    ///<summary>是否启用</summary>
    public bool Enabled { get; set; }

    ///<summary>手机号</summary>
    public string Phone { get; set; }

    ///<summary>邮箱</summary>
    public string Email { get; set; }

    ///<summary>备注</summary>
    public string Remark { get; set; }
}

public class UpdateSysUserRequest
{
    ///<summary>用户ID</summary>
    public long UserID { get; set; }

    ///<summary>昵称</summary>
    [Required]
    [JsonConverter(typeof(StringTrimConverter))]
    public string RealName { get; set; }

    ///<summary>所属部门ID</summary>
    public List<long> DepartmentIDs { get; set; }

    ///<summary>岗位ID</summary>
    public List<long> PositionIDs { get; set; }

    ///<summary>角色ID</summary>
    public List<long> RoleIDs { get; set; }

    ///<summary>是否启用</summary>
    public bool Enabled { get; set; }

    ///<summary>手机号</summary>
    public string Phone { get; set; }

    ///<summary>邮箱</summary>
    public string Email { get; set; }

    ///<summary>备注</summary>
    public string Remark { get; set; }
}

public class UpdatePasswordRequest
{
    [JsonConverter(typeof(StringTrimConverter))]
    public string OldPassword { get; set; }

    [JsonConverter(typeof(StringTrimConverter))]
    public string NewPassword { get; set; }
}

public class QueryPageSysUserRequest : PageRequestModel
{
    ///<summary>部门ID</summary>
    public long? DepartmentID { get; set; }

    ///<summary>昵称</summary>
    [JsonConverter(typeof(StringTrimConverter))]
    public string RealName { get; set; }

    ///<summary>用户名</summary>
    [JsonConverter(typeof(StringTrimConverter))]
    public string UserName { get; set; }

    ///<summary>是否启用</summary>
    public bool? Enabled { get; set; }
}
